home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks96 / NaturalOrder.sit / Natural Order / Read Me < prev    next >
Text File  |  1996-06-21  |  3KB  |  64 lines

  1. Natural Order
  2. ©1996 Stuart Cheshire <cheshire@CS.Stanford.EDU>
  3.  
  4. Introduction
  5.  
  6. Natural Order is a System Extension that improves the sorting order that your Macintosh uses when it displays lists of items.
  7.  
  8. If you have a group of numbered files on your disk and you select “View By Name” in the Finder, you might expect the files to be displayed in sensible numerical order, like this:
  9.  
  10. Picture1.jpg
  11. Picture2.jpg
  12. Picture3.jpg
  13. Picture4.jpg
  14. Picture5.jpg
  15. Picture6.jpg
  16. Picture7.jpg
  17. Picture8.jpg
  18. Picture9.jpg
  19. Picture10.jpg
  20. Picture11.jpg
  21. Picture12.jpg
  22.  
  23. If you’ve ever had a group of numbered files on your disk, you’ll know that the Finder doesn’t do this. When you select “View By Name” what you get looks like this:
  24.  
  25. Picture1.jpg
  26. Picture10.jpg
  27. Picture11.jpg
  28. Picture12.jpg
  29. Picture2.jpg
  30. Picture3.jpg
  31. Picture4.jpg
  32. Picture5.jpg
  33. Picture6.jpg
  34. Picture7.jpg
  35. Picture8.jpg
  36. Picture9.jpg
  37.  
  38. This looks stupid, and it’s because the System is just sorting the names lexicagraphically. By the same logic that dictates that “ab” comes alphabetically before “c” (which is correct) the System decides that “12” comes before “3” (which is stupid). D’oh! Natural Order works by overriding the System’s comparison of the numerical portions of strings, and sorts them by numerical value instead of “alphabetical” value.
  39.  
  40. How to use Natural Order
  41.  
  42. Drop Natural Order into the System Folder and Restart your Mac.
  43.  
  44. Restrictions
  45.  
  46. Natural Order has only been tested on System 7.5.3. It should work on other Systems, but I have not personally tested it.
  47.  
  48. Natural Order works by overriding the System’s IUMagString function. Programs that use their own sorting order and do not call IUMagString will not get any benefit from Natural Order.
  49.  
  50. Frequently Asked Questions
  51.  
  52. Are there any Frequently Asked Questions about Natural Order?
  53. Not yet.
  54.  
  55. Licence
  56.  
  57. Natural Order is freeware. Providing that you acknowledge my authorship, you may distribute it any way you like, or do anything else with it, including producing derivative works from the source code. If my source code allows you to improve the user interface of your software, then I will be happy to have made a small contribution to improving the lives of computer users.
  58.  
  59. Note: Macintosh programmers SHOULD NOT incorporate the Natural Order algorithm in their applications. Macintosh programs should call International Utilities (IU) routines, and let the System Sofware handle sorting order. Some people, like people whose primary language is not English, may prefer to have their lists sorted a different way. Using the IU routines allows the System Software to give them their preferred sorting order. The corollary of this is that programs that do not use IU routines will not receive any benefit from Natural Order. You may bundle Natural Order with your Macintosh software, along with this ReadMe file.
  60.  
  61. Version History
  62.  
  63. 0.9 Friday 21st June 1996, written overnight at MacHack, due to persistent cajoling by Quinn.
  64.